<template>
<!-- <div v-for="item in list" :key="item.id">
    id是：{{item.id}}---元素的内容是：{{ item.msg }}
</div> -->
<div v-for="(item,key) in user" :key="key">
    属性名是：{{key}}---属性值是：{{item}}


</div>
</template>
<script setup>
let list = [
    { id: 1, msg: '梅' }, 
    { id: 2, msg: '兰' }, 
    { id: 3, msg: '竹' }, 
    { id: 4, msg: '菊' }
]
let user = {
    id:11,
    name:'小明',
    gender:'男'
}
</script>